﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZCMS.Entities
{
	[Table("Cms_Article")]
	public class Article : FullAuditedEntity<int>
	{

		/// <summary>
		/// 字典名称
		/// </summary>
		[Required]
		[StringLength(200)]
		public virtual string Title { get; set; }

		/// <summary>
		/// 内容
		/// </summary>
		[Required]
		public virtual string Content { get; set; }

		/// <summary>
		/// 备注
		/// </summary>
		[MaxLength(200)]
		public virtual string Remark { get; set; }

		/// <summary>
		/// 排序
		/// </summary>
		public virtual string Seq { get; set; }

		public DateTime PublishTime { get; set; }
		
		/// <summary>
		/// 类型ID
		/// </summary>
		[Required]
		public virtual int Category_Id { get; set; }
		/// <summary>
		/// 分类
		/// </summary>
		[ForeignKey(nameof(Category_Id))]
		public virtual ArticleCategory Category { get; set; }
	}
}
